package com.sihan.framework.etm.dto;

import com.framework.util.lang.Regex;
import java.io.Serializable;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;


@Data
public class LoginDTO implements Serializable {

  private static final long serialVersionUID = -7618183810058700431L;

  /**
   * 用户名
   */
  private String username;

  /**
   * 用户密码
   */
  @NotBlank(message = "{user.password.no}")
  //@Pattern(regexp = Regex.PASSWORD, message = "{user.password}")
  private String password;

  /**
   * 是否记住我
   */
//  @NotNull
  private Boolean rememberMe;

  /**
   * 验证码
   */
  //@Pattern(regexp = "^[a-zA-Z0-9]{4}$", message = "验证码有误")
  //@NotBlank(message = "{user.captcha}")
  private String captcha;

  @Override
  public String toString() {
    return "用户名[" + username + "]。";
  }
}
